<template>
    <div class="qingwu">
        <div class="admin_table_page_title">
            <a-button @click="$router.back()" class="float_right" icon="arrow-left">返回</a-button>
            店铺信息
        </div>
        <div class="unline underm"></div>
        <div class="admin_form">
            <a-descriptions bordered layout="vertical" :column="{ xxl: 4, xl: 4, lg: 2, md: 2, sm: 2, xs: 1 }">
                <a-descriptions-item label="商品标题">{{info.goods.goods_name}}</a-descriptions-item>
                <a-descriptions-item label="商品分类">{{info.goods.cate_name}}</a-descriptions-item>
                <a-descriptions-item label="图片">
                    <div v-viewer>
                        <img height="120px" :src="info.goods.goods_images[0]" alt="">
                    </div>
                </a-descriptions-item>
                <a-descriptions-item label="订单总价（元）">{{info.total_amount}}</a-descriptions-item>
                <a-descriptions-item label="订单号">{{info.order_sn}}</a-descriptions-item>
                <a-descriptions-item label="订单状态">{{info.state_text}}</a-descriptions-item>
                <a-descriptions-item label="用户昵称">{{info.user.nickname}}</a-descriptions-item>
                <a-descriptions-item label="下单时间">{{info.created_at}}</a-descriptions-item>
                <a-descriptions-item label="支付时间">{{info.pay_at}}</a-descriptions-item>
                <a-descriptions-item label="买家评价">{{info.comment ? info.comment.content : ''}}</a-descriptions-item>
                <a-descriptions-item label="买家评价时间">{{info.comment ? info.comment.created_at : ''}}</a-descriptions-item>
                <a-descriptions-item label="卖家回复">{{info.comment ? info.comment.seller_content : ''}}</a-descriptions-item>
                <a-descriptions-item label="卖家回复时间">{{info.comment ? info.comment.seller_at : ''}}</a-descriptions-item>

            </a-descriptions>

        </div>
    </div>
</template>

<script>
    import Viewer from 'v-viewer'
    import 'viewerjs/dist/viewer.css'

    Vue.use(Viewer)
    export default {
        components: {},
        props: {},
        data() {
            return {
                info: {},
                id: 0,
            };
        },
        watch: {},
        computed: {},
        methods: {
            get_info() {
                this.$get(this.$api.fleaOrder + '/' + this.id).then(res => {
                    this.info = res.data;
                })
            },
            onload() {
                // 判断你是否是编辑
                if (!this.$isEmpty(this.$route.params.id)) {
                    this.id = this.$route.params.id;
                    this.get_info();
                }
            },

        },
        created() {
            this.onload();
        },
        mounted() {
        }
    };
</script>
<style lang="scss" scoped>
    .verify_btn {
        margin-top: 30px;
    }
</style>
